﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ProStore
{
    public partial class Login : Form
    {
        public Panel refPanel;

        public Login()
        {
            InitializeComponent();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Servidores frmServidores = new Servidores();
            frmServidores.ShowDialog();
        }

        private void Login_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            DAO dao = new DAO();

            if(dao.Conectar())
            {
                refPanel.toolStripStatusConnection.Text = "Conectado";
            }else
            {
                MessageBox.Show("No se ha podido realizar la conexión. Vuelva a intentarlo y si el problema persiste contacte al administrador del sistema.");
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }
}
